<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/common/common.jsp" %>
<html>   
  <head>   
  <meta   http-equiv="Content-Type"   content="text/html;   charset=gb2312">   
  <title>emu's   sample   of   printing   with   title</title>   
  <style>   
  @media   screen{.onlyPrint{display:none}}   
  @media   print{.onlyShow{display:none}   .onlyPrint{page-break-before:always}}   
  </style>   
  <SCRIPT   LANGUAGE="JavaScript">   
  <!--   
  //   这里定义每页能打印多少行   
  //模拟数据   
  function   prepare()   
  {   
  /*var   ar   =   new   Array()   
  for   (var   i=parseInt(linesPerPage.value);i<(show.children.length-1);   i+=parseInt(linesPerPage.value))   
  {   
  var   tr   =   show.insertBefore(show.firstChild.cloneNode(true),show.children[i]);   
  tr.className   =   "onlyPrint"   
  ar[ar.length]   =   tr;   
  }   */
  document.getElementById('tb1').className = '';
  	preView();
  	document.getElementById('tb1').className = 'onlyShow';
  /*for   (var   i=ar.length-1;i>-1;i--)   
  show.deleteRow(ar[i].rowIndex) */  
  }   
  
  function   prepare2()   
  {   
  	document.getElementById('div1').className = '';
  	preView();
  	document.getElementById('div1').className = 'onlyShow';
  }

  function   prepare3()   
  {   
  	document.getElementById('div1').className = '';
  	
  	document.getElementById('div1').className = 'onlyShow';
  }
  
  function   pageSetup(){try{WB.ExecWB(8,1)}catch(e){alert("您的浏览器不支持此功能")}}   
  function   preView(){try{WB.ExecWB(7,1)}catch(e){alert("您的浏览器不支持此功能")}}   
  
  //-->   
  </SCRIPT>   
  </head>   
  <body>   
  <OBJECT   classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2   height=0   id=WB   width=0   VIEWASTEXT></OBJECT>   
  <div   class=onlyShow>   
  设定每页打印   
  <input   id=linesPerPage   size=4   value=10>行   &nbsp;   &nbsp;   
  <button   onclick='pageSetup()'>页面设置</button>   
  &nbsp;<button   onClick='prepare()'>打印预览1</button><BR><BR>   
  &nbsp;<button   onClick='prepare2()'>打印预览2</button><BR><BR>   
  &nbsp;<button   onClick='prepare3()'>打印预览3</button><BR><BR>   
  
  </div> 
  
  <table id="tb1" class="onlyShow"  bgcolor=balck   cellspacing=1   cellpadding=3   align=center>   
  <tbody   bgcolor=white   id=show>   
  <tr><td>员工号</td><td>姓名</td><td>职务</td><td>部门</td><td>扣税</td><td>上月结余</td><td>实发工资</td><td>应发工资</td><td>应扣款</td></tr>   
  <tr><td>员工号</td><td>姓名</td><td>职务</td><td>部门</td><td>扣税</td><td>上月结余</td><td>实发工资</td><td>应发工资</td><td>应扣款</td></tr>   
  <tr><td>员工号</td><td>姓名</td><td>职务</td><td>部门</td><td>扣税</td><td>上月结余</td><td>实发工资</td><td>应发工资</td><td>应扣款</td></tr>   
  <tr><td>员工号</td><td>姓名</td><td>职务</td><td>部门</td><td>扣税</td><td>上月结余</td><td>实发工资</td><td>应发工资</td><td>应扣款</td></tr>   
   
  </tbody>  
  </table> 
  <div id="div1" class="onlyShow">
  hello
  </div>
  </body>   
  </html>
